﻿using MediatR;
using RBAC.LuFang.API.Application.Command.RoleCommand;
using RBAC.LuFang.Domin.Services;

namespace RBAC.LuFang.API.Application.CommandHandlers.RoleHandler
{
    //删除角色下的员工
    public class RoleEmployeeDeleteCommandHandler:IRequestHandler<RoleEmployeeDeleteCommand,int>
    {
        private readonly IRoleService _roleService;

        public RoleEmployeeDeleteCommandHandler(IRoleService roleService)
        {
            _roleService = roleService;
        }

        public async Task<int> Handle(RoleEmployeeDeleteCommand request, CancellationToken cancellationToken)
        {
            return await _roleService.Del(request.urId);
        }
    }
}
